#include "csapp.h"
    int main(int argc,char **argv){
    struct in_addr inaddr;
    int rc;
    if(argc!=2)
    {
    fprintf(stderr,"usafe:%s<dotted-decimak>\n",argv[0]);
    
    }
    rc=inet_pton(AF_INET,argv[1],&inaddr);
    if(rc==0)
    app_error("inet_pton error:invalid dotted-decimal address");
    else if(rc<0)
    unix_error("inet_pton error");
    printf("0x%x\n",ntohl(inaddr.s_addr));
    exit(0);
    }
